package com.example.p2pmessages;

import java.io.Serializable;
import java.net.InetAddress;
import java.util.Date;

public class Message implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -674671584382557018L;
	
	private Date date;
	private String payload;
	private long rtt;
	private InetAddress senderIP;
	private int senderPort;
	private String sentMessage;
	private String timestamp;

	public String getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(String timestamp) {
		this.timestamp = timestamp;
	}

	public Message(Date date, String payload, long rtt, InetAddress senderIP,
			int senderPort, String sentMessage, String timestamp) {
		super();
		this.date = date;
		this.payload = payload;
		this.rtt = rtt;
		this.senderIP = senderIP;
		this.senderPort = senderPort;
		this.sentMessage = sentMessage;
		this.timestamp = timestamp;
	}

	public String getSentMessage() {
		return sentMessage;
	}

	public void setSentMessage(String sentMessage) {
		this.sentMessage = sentMessage;
	}

	public Date getDate() {
		return date;
	}

	public void setTimestamp(Date date) {
		this.date = date;
	}

	public String getPayload() {
		return payload;
	}

	public void setPayload(String payload) {
		this.payload = payload;
	}

	public long getRtt() {
		return rtt;
	}

	public void setRtt(long rtt) {
		this.rtt = rtt;
	}

	public InetAddress getSenderIP() {
		return senderIP;
	}

	public void setSenderIP(InetAddress senderIP) {
		this.senderIP = senderIP;
	}

	public int getSenderPort() {
		return senderPort;
	}

	public void setSenderPort(int senderPort) {
		this.senderPort = senderPort;
	}

}
